package com.twang.stock.controller.common;

import com.twang.stock.entity.Course;
import com.twang.stock.service.abhs.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 艾宾浩斯记忆曲线学习入口
 */
@RestController
@RequestMapping("/api/courses")
public class CourseController {

    @Autowired
    private CourseService courseService;

    // 获取所有课程列表
    @GetMapping
    public List<Course> getAllCourses() {
        return courseService.getAllCourses();
    }

}
